IRCBot::Plugin.define 'restart' do
	help_string 'Restarts me.'
	@authed_users = %w[niexs!eduardo eduardo!eduardo monkeyofdoom!ircuser]
	def command(user,target,message,hostmask)
		if @authed_users.include?(hostmask.downcase.split('@')[0]) then
			Thread.new do
				send('QUIT :Restarting, brb')
				system("ruby #{$0} #{ARGV.join(' ')}")
			end
		end
	end
end
